package org.tgcloud.group.core;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by cloudLiu on 2015/8/3.
 */
@Data
@ApiModel
public class ResultMessage<T,L> {
    @ApiModelProperty("页数")
    private int allPageNumber;
    @ApiModelProperty("总条数")
    private long count;
    @ApiModelProperty("data")
    private T data;
    @ApiModelProperty("token")
    private String token;
    @ApiModelProperty("list")
    private List<L> list;


    public static ResultMessage builder(){
        return new ResultMessage();
    }

    public ResultMessage setAllPageNumber(int allPageNumber) {
        this.allPageNumber = allPageNumber;
        return this;
    }

    public ResultMessage setToken(String token) {
        this.token = token;
        return this;
    }

    public ResultMessage setList(List list) {
        this.list = list;
        return this;
    }

    public ResultMessage<T, L> setData(T data) {
        this.data = data;
        return this;
    }

    public ResultMessage setCount(long count) {
        this.count = count;
        return this;
    }

}
